<template>
	<div id="all" >
		<div class="all-wrap">
			<v-empty v-if="show" :height="height" ></v-empty>
			<v-single :item="list" v-else></v-single>
		</div>
	</div>
</template>

<script>

	import Empty from "../home/shopping/body-empty.vue";
	import Single from "./single.vue";
	import config from "../config/config.js";
	export default{
		components:{
			"v-empty":Empty,
			"v-single":Single
    	},
		props:{
			type:String,
			height:'',
			show:Boolean,
			list:Array,
			hello:''
		},
		data(){
			return{
				list:[],
				isShow: false,
				lock: true,
				page:1
            }
		},
		methods:{
			scrollEvent(e) {
				sessionStorage.setItem("orderTop", e.target.scrollTop);
			}
		},
		mounted(){
			document.getElementById("outer").onscroll = this.scrollEvent;
			if (sessionStorage.getItem("orderTop")) {
				document.getElementById("outer").scrollTop = sessionStorage.getItem(
					"orderTop"
				);
			}
		},
		activated(){
			var that = this;
			document.getElementById("outer").onscroll = this.scrollEvent;
			if (sessionStorage.getItem("orderTop")) {
				document.getElementById("outer").scrollTop = sessionStorage.getItem(
					"orderTop"
				);
			}
		},
		deactivated() {
			document.getElementById("outer").onscroll = null;
		},
		beforeDestroy() {
			document.getElementById("outer").onscroll = null;
		}
	}
</script>

<style>
</style>